﻿// *----------------------------------------------------------------
// Copyright (C) 2017 通通优品
// 版权所有。
// 
// 类名：Client.cs
// 功能描述：TongTongMall.MallWeb.Core
// 
// Create User：jym 2017/02/09
// 
// Edit User：UserName,EditTime
// Describe：Describe
// ----------------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TongTongMall.Domain.Repositories.Attributes;
using TongTongMall.Domain.Repositories.Entities;

namespace TongTongMall.MallWeb.Core.Authorization
{
    [System.ComponentModel.DataAnnotations.Schema.Table("Clients")]
    public class Client : Entity
    {
        /// <summary>
        /// 客户端ID
        /// </summary>
        [Identify]
        public long Id { get; set; }

        /// <summary>
        /// 客户端秘钥
        /// </summary>
        public string Secret { get; set; }

        /// <summary>
        /// 客户端名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 是否启用
        /// </summary>
        public bool IsActive { get; set; }

        /// <summary>
        /// 刷新令牌过期时间
        /// </summary>
        public int RefreshTokenLifeTime { get; set; }

        /// <summary>
        /// accesstoken过期时间
        /// </summary>
        public int AccessTokenLifeTime { get; set; }

        public DateTime DateAdded { get; set; }

        /// <summary>
        /// 公共token授权过期时间
        /// </summary>
        public int PublicAccessTokenLiftTime { get; set; }

    }
}
